package com.hnichr.ping.sms.channel;

import com.hnichr.ping.common.vo.SendResultVo;
import com.hnichr.ping.common.vo.SmsSendVo;
import com.hnichr.ping.sms.entity.SmsChannel;
import org.apache.commons.lang3.StringUtils;

public interface SmsChannelProvider {

    default SendResultVo paramVerify(SmsSendVo smsSendVo){
        return SendResultVo.success();
    }

    String getProviderCode();

    //SendResultVo send(SmsChannel channel, String [] mobiles, String sms);
    SendResultVo send(SmsChannel channel, SmsSendVo smsSendVo);

    default boolean accept(String providerCode){
        return StringUtils.equals(getProviderCode(),providerCode);
    }
}
